<?php 
namespace Admin\Model;
use Think\Model;
class UserModel extends Model {
		public function checkEmail($email)
		{
			// $res = $this->where("email={'$email'}")->find();
			$sql = "select * from user where email='{$email}'";
			$res = $this->query($sql);
			// var_dump($res);
			return $res;
		}

		public function checkName($username)
		{
			$sql = "select * from user where username='{$username}'";
			$res = $this->query($sql);
			// var_dump($res);
			return $res;
		}
	}